package com.yanfan.iot.domain;

import com.yanfan.common.annotation.Excel;
import com.yanfan.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.util.Date;

@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "DeviceHistory", description = "设备历史轨迹 iot_device_history")
@JsonInclude(JsonInclude.Include.NON_NULL)
@Data
public class DeviceHistory extends BaseEntity {

    /**
     * 序号
     */
    @ApiModelProperty("序号")
    private Long ID;

    /**
     * 设备编号
     */
    @ApiModelProperty("设备编号")
    @Excel(name = "设备编号")
    private String serialNumber;

    /**
     * 上报时间
     */
    @ApiModelProperty("上报时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "上报时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date reportTime;

    /**
     * 设备经度
     */
    @ApiModelProperty("设备经度")
    @Excel(name = "设备经度")
    private BigDecimal longitude;

    /**
     * 设备纬度
     */
    @ApiModelProperty("设备纬度")
    @Excel(name = "设备纬度")
    private BigDecimal latitude;
}
